module.exports = {
  lintOnSave: false, // 修改成false 就是不检查了
  chainWebpack: (config) => {
    config.plugin("html").tap((args) => {
      args[0].title = "中国新闻发布";
      return args;
    });
  },
  devServer: {
    host: "0.0.0.0",
    port: 8088,
    // 配置跨域
    proxy: {
      "/cms": {
        // 目标路径
        // target: "http://192.168.0.105:8080",
        target: "http://8.142.116.233:8080",
        // target: "http://192.168.0.197:8080",

        //target: "https://www.zgxwfb.cn/api",
        // target: "https://v5v2540972.goho.co",
        // 允许跨域
        changeOrigin: true,
        // 路径重写
        pathRewrite: {
          "^/cms": "/cms",
        },
      },
    },
  },
  css: {
    loaderOptions: {
      // sass-loader版本V8以上
      // prependData: '@import "~@/assets/common.scss";'
      // sass-loader版本V8以下
      // additionalData: '@import "~@/assets/common.scss";'
      sass: {
        additionalData: `@import "./src/assets/style";`,
      },
    },
  },
};
